#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export JAVA_HOME=/usr/lib/jvm/default-java
export ANT=ant

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with javahelper

override_dh_auto_build:
	dh_auto_build -- deb-src-rebuild

# Copy OS specific and native libs
override_dh_install-indep:
	dh_install -plibjitsi

override_dh_install-arch:
ifeq ($(DEB_HOST_ARCH),amd64)
	dh_install -plibjitsi-jni lib/native/linux-64/*.so usr/lib/jni/
else
	dh_install -plibjitsi-jni lib/native/linux/*.so usr/lib/jni/
endif

override_dh_auto_clean:
	dh_auto_clean -- clean-debuild

get-orig-source:
	uscan
